<form onsubmit="return(add(this))" method="post" action="javascript:alert('表单没有验证!')">

<div class="bodytabdiv">
<table class='bodytab' cellspacing='1'>
<tr>
	<th class='th' colspan='2'>{-if $L.id-}修改{-else-}添加{-/if-}左侧栏节点</th>
</tr>

<tr>
	<td width='120'>节点名</td>
	<td><input name='name' value='{-$L.name-}'></td>
</tr>

<tr>
	<td width='120'>父节点</td>
	<td>{-$P.name-}</td>
</tr>

<tr>
	<td >优先级</td>
	<td><input name='orderId' value='{-$L.orderId|default:'0'-}' size='2' maxlength='2'></td>
</tr>

	{-if !$L.id || !$L.isCanChangeParent-}
<tr>
 <td>是否父节点</td>
 <td>

	<label for="d_isParent1"><input type="radio" name="isParent" id="d_isParent1" value='1'{-if $L.isParent-} checked='true'{-/if-}>是</label>
	<label for="d_isParent0"><input type="radio" name="isParent" id="d_isParent0" value='0'{-if !$L.isParent-} checked='true'{-/if-}>否
 </td>
</tr>
	{-/if-}

<tr>
 <td>是否隐藏节点</td>
 <td>
	<label for="d_isHide1"><input type="radio" name="isHide" id="d_isHide1" value='1'{-if $L.isHide-} checked='true'{-/if-}>是</label>
	<label for="d_isHide0"><input type="radio" name="isHide" id="d_isHide0" value='0'{-if !$L.isHide-} checked='true'{-/if-}>否</label>
 </td>
</tr>

<tr>
	<td width='120'>模块</td>
	<td><input name='mod' value='{-$P.mod|default:$L.mod-}' {-if $P.mod-}readonly="readonly"{-/if-}size='24' maxlength='24'></td>
</tr>

<tr>
	<td width='120'>功能</td>
	<td><input name='fun' value='{-$P.fun|default:$L.fun-}' {-if $P.fun-}readonly="readonly" {-/if-}size='24' maxlength='24'></td>
</tr>

<tr>
	<td width='120'>动作</td>
	<td><input name='act' value='{-$L.act-}' size='10' maxlength='10'></td>
</tr>

<tr>
	<td width='120'>补充</td>
	<td><input name='tail' value='{-$L.tail-}' size='8' maxlength='8'/ >  =&gt; <input name='detail' value='{-if $L.detail-}{-$L.detail-}{-/if-}' size='8' maxlength='8'/ > </td>
</tr>

</table>
</div>


<input type='hidden' name='jurl' value='{-$_ENV.referer-}'>

<div class='bodysubmit'>
<input type='submit' value='递交'>
<input type='reset' value='默认'>
</div>

</form>

<div class='bodyfooter'>
	<a href='{-$_ENV.referer-}'>返回</a>
</div>

<script type="text/javascript">
var isp=false;
function add(f){
	if(isp) {alert('表单已经递交!');return false;}
	var e=f.elements['name'];	if(!e.value.match(/^([^\x00-\xff]|\w){1,15}$/)){
		alert('节点名只不能为空,并且不能包含特殊字符!');	e.select();e.focus(); return false;
	}

	var e = f.elements['orderId']; if( !e.value.match(/^\d{1,2}$/)){
		alert('优先级只能是不大于100的数字'); e.select(); e.focus(); return false;
	}

	var e=f.elements['mod'];	if(!e.value.match(/^\w{2,24}$/)){
		alert('{-$_ENV._node.mod-}名不能为空,并且不少于2个字符!');	e.select();e.focus(); return false;
	}

	var e=f.elements['fun'];	if(!e.value.match(/^$|^[\w\-]{2,24}$/)){
		alert('{-$_ENV._node.fun-}名不少于2个字符!');	e.select();e.focus(); return false;
	}

	
	var e=f.elements['act'];	if(!e.value.match(/^$|^\w{2,24}$/)){
		alert('{-$_ENV._node.act-}名不少于2个字符!');	e.select();e.focus(); return false;
	}


	var e=f.elements['tail'];	if(!e.value.match(/^$|^\w{2,24}$/)){
		alert('只能是字母数字!');	e.select();e.focus(); return false;
	}

	var e=f.elements['detail'];	if(!e.value.match(/^$|^\d{2,10}$/)){
		alert('只能是数字!');	e.select();e.focus(); return false;
	}

	f.action="{-$body.url-}&act={-if $L.id-}eok&id={-$L.id-}{-else-}aok{-/if-}";
	isp=true;
	return true;
}
</script>